﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Aspfm.Html
{
    [Serializable()]
    public enum AspfmType
    {
        EmptySpace,
        Label,
        Div,
        Text,
        Group,
        TabGroup,
        Combobox,
        Button,
        Checkbox,
        Radio,
        AspfmCtrol
    }

    public class AspfmTypeConvert
    {
        public static AspfmType GetAspfmType(string text)
        {
            text = text.ToLower();
            if (text.Contains("text"))
            {
                return AspfmType.Text;
            }
            else if (text.Contains("label"))
            {
                return AspfmType.Label;
            }
            else if (text.Contains("空白"))
            {
                return AspfmType.EmptySpace;
            }
            else if (text.Contains("div"))
            {
                return AspfmType.Div;
            }
            else if (text.Contains("radio"))
            {
                return AspfmType.Radio;
            }
            else if (text.Contains("checkbox"))
            {
                return AspfmType.Checkbox;
            }
            else if (text.Contains("combobox"))
            {
                return AspfmType.Combobox;
            }
            else if (text.Contains("button"))
            {
                return AspfmType.Button;
            }
            return AspfmType.AspfmCtrol;
        }
    }
}
